
<html>
	<head>
		<script src="../src/js/base/g.js"></script>
		<script>

			// Define ClassA
			var ClassA = G.GClass('APP', 'ClassA', function() {
				this.__init();
			});
			// Constructure
			ClassA.prototype.__init = function() {
				document.write("ClassA::ClassA</br>");
				this.testValue = "AAAA";
			}
			ClassA.prototype.test_func_a = function() {
				document.write("call ClassA.test_func_a</br>");
			}

			// Define ClassB inherited from ClassB
			var ClassB = G.GClass('APP', 'ClassB', function() {
				this.__init();
			}, G.APP.ClassA);

			ClassB.prototype.__init = function() {

				this.__APP__ClassA__init();
				document.write("ClassB::ClassB</br>");
				this.testValue = "BBBB";
			}

			function demo_init() {
				var B = new ClassB();
				document.write("testValue=", B.testValue + "</br>");

				B.test_func_a();
			}

		</script>
	</head>
	<body onload="demo_init()">
		<table class="layout">
			<tr><td class="center"></td></tr>
		</table>
	</body>
</html>
